﻿####################################################################################
# Court Whores - In Semen Patch (private) - v4.1
# Restores the pre-v6.9 aftermath: sex leaves a cum overlay on the portrait of
# any participant with the court_whore trait for 50-80 days.
#
# STATE: one of nine invisible character flags cw_insemen_look_1..9 (1-3 doggy,
# 4-6 missionary, 7-9 oral), auto-expiring via add_character_flag days. Flags,
# NOT variables: portrait modifier triggers are also evaluated on weak
# character refs, which do not support variables (has_variable spams the
# error.log there) - CBO's own portrait triggers use exists = this +
# has_character_flag for exactly this reason. And no traits: v1-v3 re-used
# CBO's cum_* traits, which put an icon in the character UI and fired a toast
# on every use.
#
# HOOK stays v3: the carn_on_sex_v2 on_action (fired by Carnalitas/CSE's
# carn_had_sex_with_effect_v2 at the end of EVERY sex resolution; same-key
# on_actions merge). No foreign file is copied anywhere - no re-sync duty.
####################################################################################

# Scope: character. Clears our overlay flags plus leftover CBO traits from
# v1-v3 saves and aborted CBO scene chains (safe no-ops if absent).
cw_insemen_clear_effect = {
    remove_character_flag = cw_insemen_look_1
    remove_character_flag = cw_insemen_look_2
    remove_character_flag = cw_insemen_look_3
    remove_character_flag = cw_insemen_look_4
    remove_character_flag = cw_insemen_look_5
    remove_character_flag = cw_insemen_look_6
    remove_character_flag = cw_insemen_look_7
    remove_character_flag = cw_insemen_look_8
    remove_character_flag = cw_insemen_look_9
    remove_trait = cum_doggy_1
    remove_trait = cum_doggy_2
    remove_trait = cum_doggy_3
    remove_trait = cum_miss_1
    remove_trait = cum_miss_2
    remove_trait = cum_miss_3
    remove_trait = cum_oral_1
    remove_trait = cum_oral_2
    remove_trait = cum_oral_3
}

# Scope: character (the used whore). Re-use overwrites look and timer;
# expiry removes the overlay silently.
cw_insemen_apply_effect = {
    cw_insemen_clear_effect = yes
    random_list = {
        1 = { cw_insemen_roll_look_effect = { DAYS = 50 } }
        1 = { cw_insemen_roll_look_effect = { DAYS = 60 } }
        1 = { cw_insemen_roll_look_effect = { DAYS = 70 } }
        1 = { cw_insemen_roll_look_effect = { DAYS = 80 } }
    }
}

cw_insemen_roll_look_effect = {
    random_list = {
        1 = { add_character_flag = { flag = cw_insemen_look_1 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_2 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_3 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_4 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_5 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_6 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_7 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_8 days = $DAYS$ } }
        1 = { add_character_flag = { flag = cw_insemen_look_9 days = $DAYS$ } }
    }
}